<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>生产计划管理</title>
		<link rel="stylesheet" type="text/css" href="../../css/style.css"/>
		<link rel="stylesheet" type="text/css" href="../../css/list.css"/>
		<link rel="stylesheet" type="text/css" href="../../css/layui.css"/>
			<style type="text/css">
			
			/* 工艺管理弹框样式 */
.input_radio2{
    width: 300px;
    height: 300px;
    text-align: center;
    position: absolute;
    top: 50%;
    left: 50%;
    margin-left: -150px;
    margin-top: -100px;
    background: rgb(245, 245, 245);
    border: 1px solid rgb(200, 200, 200);
    box-shadow: 5px 5px 5px rgb(100, 100, 100);
}


.input_radio2 p{
	text-align: center;
	height: 30px;
	background: rgb(68, 161, 248);
	line-height: 30px;
	color: white;
	margin-bottom: 25px;
}

.input_radio2 p{
	text-align: center;
	height: 30px;
	background: rgb(68, 161, 248);
	line-height: 30px;
	color: white;
	margin-bottom: 25px;
}

.input_radio2 .fs-wrap{
	    width: 200px;
}
/**
 * 产品编号弹框
 */
.org_window {
		width: 800px;
		height: 300px;
		text-align: center;
		position: absolute;
		top: 35%;
		left: 30%;
		margin-left: -150px;
		margin-top: -100px;
		background: rgb(245, 245, 245);
		border: 1px solid rgb(200, 200, 200);
		box-shadow: 5px 5px 5px rgb(100, 100, 100);
	}
	
	.org_window p {
		text-align: center;
		height: 30px;
		background: rgb(68, 161, 248);
		line-height: 30px;
		color: white;
		margin-bottom: 25px;
	}
	.td_with {
		width: 243px;
	}
		</style>	
	</head>
	<body>
		<!-- 蓝色背景区域 -->
		<div class="wrap" >
			<!-- 白色可用区域 -->
			<div class="canuse">
				<!------ 位置 ------>
	            <p class="contentText local"><span>位置：生产工单管理 > 生产计划管理</span></p>
	            
	            <!------ tab标签 ------>   
	            <div class="layui-tab layui-tab-card" >
					<div class="layui-tab-content">
					    <div class="layui-tab-item layui-show">
					    	<div class="content">
					    		<!-- 搜索区 -->
					            <div class="search_area">
				                    <h4 class="sel_title"><img src="../../img/list/brand1.png" /><span>生产计划查询条件</span></h4>
				                    <div class="select_area">
				                        <div class="select_text clear">
				                        	<div class="label_input">
					                            <label class="contentText">产品代号：</label> <input type="text" name="" id="">
				                        	</div>
				                        	<div class="label_input">
					                            <label class="contentText">零部件号：</label> <input type="text" name="" id="">
				                        	</div>
				                        	<div class="label_input">
					                            <label class="contentText">计划号：</label> <input type="text" name="" id="">
				                        	</div>
				                        	<div class="label_input">
					                            <label class="contentText">任务状态：</label> 
					                            	<select id = "orderSelect">
										    		    <option value = "全部">在制</option>
						                            	<option value="未排产">已完工</option>
						                            	<option value="生产中">未发布</option>
						                            	<option value="已完工">暂停</option>
	                       						     </select>
				                        	</div>
				                            <div class="floatLeft">
					                            <button class="btn_search bgd_blue_search">查询</button>
					                            <button class="btn_clear bgd_white_clear">重置</button>
				                            </div>
				                        </div>
				                    </div>
					            </div>
		            
		            			<!-- 列表区 -->
					            <div class="show_list" >
				                	<div class="title_operate">
				                    	<h4 class="sel_title"><img src="../../img/list/brand1.png" /><span>生产计划信息列表</span></h4>
				                		<!-- 操作类型区 -->
				                        <div class="operate_area">
					                            <a id="" href="productionPlanManagementAdd.html" class="bgd_add img_hand">增加</a>
					                            <a id="del" class="bgd_delete img_hand">删除</a>
				                            <a class="bgd_publish img_hand" id="publishPlan">发布</a>
				                            <a class="bgd_pause img_hand" id="pausePlan">暂停</a>
				                            <a class="bgd_recover img_hand" id="resumePlan">开始</a>
				                            <a class="bgd_withdraw img_hand" id="cancelPlan">撤回</a>
				                            <a class="bgd_export img_hand" id="downloadEBOMTemplate">模板</a>
				                            <a id="exportPlan" class="bgd_import img_hand">导入</a>

				                        </div>
				                	</div>
				                	<div class="list_area">
				                        <!-- 信息列表区 -->
				                        <div class="info_area" style="overflow:auto;" >
				                            <table class="tablelist tablelistStandard" border="1" cellspacing="0" cellpadding="0">
				                                <tbody>
				                                    <tr class="menuText list_head">
				                                    	<th class="checkSelectAll"></th>
                                      					<th>序号</th>
				                                        <th>生产批次号</th>
				                                        <th>计划类型</th>
				                                        <th>计划号</th>
				                                        <th>产品代号</th>
				                                        <th>零部件代号</th>
				                                        <th>计划数量</th>
				                                         <th>产品编号</th>
				                                        <th>完工数量</th>
				                                        <th>计划开工时间</th>
				                                        <th>计划完工时间</th>
				                                        <th>实际开工时间</th>
				                                        <th>实际完工时间</th>
				                                        <th>完工进度</th>
				                                        <th>创建人</th>
				                                        <th>创建时间</th>
				                                       <th >发布时间</th>
				                                       <th>任务状态</th>
				                                        <th>备注</th>
				                                    </tr>
				                                </tbody>
				                                <tbody id='tableList'>
				                                    <tr class="listTableText list_list">
				                                    	<td><input type="checkbox" class="input_checkBox" name="" id="" value=""></td>
				                                    	<td>1</td>
				                                        <td>001</td>
				                                        <td>月度计划</td>
				                                        <td ><a class="cursor editBlue" href="productionPlanManagementUpdate.html">SCJH2019001702XD001</a></td>
				                                        <td>702XD</td>
				                                        <td>0301-01</td>
				                                         <td>5</td>
				                                        <td ><a id="productNumberDisplay">详情</a></td>
				                                        <td>3</td>
				                                        <td>2020-02-15</td>
				                                        <td>2020-02-28</td>
				                                        <td>2020-09-07 08:52:29</td>
				                                        <td>2020-09-17 21:37:16</td>
				                                        <td><a class="cursor editBlue" id="completionSchedule">60%</a></td>
				                                        <td>admin</td>
				                                       <td>2018-09-11 21:37:16</td>
				                                        <td>2018-09-15 21:37:16</td>
				                                        <td>未开工</td>
				                                       <!-- <td class="td_ellipsis" title="更新时间：2018-05；已到物料：物料一10个，物料二100个，物料三500个；详情：物料一补料80个，物料二补料200个，物料三补料50个。。。">更新时间：2018-05；已到物料：物料一10个，物料二100个，物料三500个；详情：物料一补料80个，物料二补料200个，物料三补料50个。。。</td>
				                                        <td>已完工</td>-->
				                                        <td></td>
				                                    </tr>
				                                        <tr class="listTableText list_list">
				                                    	<td><input type="checkbox" class="input_checkBox" name="" id="" value=""></td>
				                                    	<td>2</td>
				                                        <td>002</td>
				                                        <td>临时计划</td>
				                                        <td ><a class="cursor editBlue" href="productionPlanManagementUpdate.html">LSJH2019001804A001</a></td>
				                                        <td>804A</td>
				                                         <td>0402</td>
				                                         <td>10</td>
				                                        <td><a id="productNumberDisplay">详情</a></td>
				                                        <td>5</td>
				                                        <td>2018-03-15</td>
				                                        <td>2018-03-28</td>
				                                        <td>2018-10-07 18:52:29</td>
				                                        <td>2018-20-17 11:37:16</td>
				                                        <td><a class="cursor editBlue">50%</a> </td>
				                                        <td>admin</td>
				                                       <td>2018-11-11 16:37:16</td>
				                                        <td>2018-11-15 09:37:56</td>
				                                        <td>未开工</td>
				                                       <!-- <td class="td_ellipsis" title="更新时间：2018-05；已到物料：物料一10个，物料二100个，物料三500个；详情：物料一补料80个，物料二补料200个，物料三补料50个。。。">更新时间：2018-05；已到物料：物料一10个，物料二100个，物料三500个；详情：物料一补料80个，物料二补料200个，物料三补料50个。。。</td>
				                                        <td>已完工</td>-->
				                                        <td></td>
				                                    </tr>
				                                      <tr class="listTableText list_list">
				                                    	<td><input type="checkbox" class="input_checkBox" name="" id="" value=""></td>
				                                    	<td>3</td>
				                                        <td>003</td>
				                                        <td>月度计划</td>
				                                        <td ><a class="cursor editBlue" href="productionPlanManagementUpdate.html">SCJH2019001702XD001</a></td>
				                                        <td>702XD</td>
				                                         <td>0301-01</td>
				                                         <td>5</td>
				                                        <td ><a id="productNumberDisplay">详情</a></td>
				                                        <td>3</td>
				                                        <td>2020-02-15</td>
				                                        <td>2020-02-28</td>
				                                        <td>2020-09-07 08:52:29</td>
				                                        <td>2020-09-17 21:37:16</td>
				                                        <td><a class="cursor editBlue" id="completionSchedule">60%</a></td>
				                                        <td>admin</td>
				                                       <td>2018-09-11 21:37:16</td>
				                                        <td>2018-09-15 21:37:16</td>
				                                        <td>未开工</td>
				                                       <!-- <td class="td_ellipsis" title="更新时间：2018-05；已到物料：物料一10个，物料二100个，物料三500个；详情：物料一补料80个，物料二补料200个，物料三补料50个。。。">更新时间：2018-05；已到物料：物料一10个，物料二100个，物料三500个；详情：物料一补料80个，物料二补料200个，物料三补料50个。。。</td>
				                                        <td>已完工</td>-->
				                                        <td></td>
				                                    </tr>
				                                </tbody>
				
				                            </table>
				                        </div>
					                    <!-- 页码区域 -->
					                    <div class="page_area contentText clear">
					                    	<div class="page_sum">
					                    		共<span class="page_number"> 3 </span>页&emsp;每页 10 条&emsp;共<span class="info_sum"> 27 </span>条记录
					                    	</div>
					                        <div class="page_jump">
					                        	<span>跳转到&emsp;第</span>
					                        	<input type="text" name="" id="" value="" />
					                        	<span>页&emsp;</span>
					                        	<button>Go</button>
					                        </div>
					                        <div class="page-pull-right async-page">
					                            <button>上一页</button>
					                            <button class="select_page">1</button>
					                            <button>2</button>
					                            <button>3</button>
					                            <button style="color: rgb(30, 30, 30);">▪▪▪</button>
					                            <button>98</button>
					                            <button>99</button>
					                            <button>100</button>
					                            <button>下一页</button>
					                        </div>
					                    </div>
				                    </div>
				                </div>
					    	</div>
						</div>
			<!-- 版尾  -->
			<div class="ending">
				Copyright 2019-2020 磐基技术有限公司
			</div>
			<!--导入弹框-->		
			<div id = "exportBOMDiv" class="mask hidden">
			<div class="input_radio2">
				<p>导入生产计划文件</p>
				<div id = "popWindow">
					请选择：<input type="file" id="productTechnologyInput" >
				</div>
				<div style="position: absolute;bottom: 10px;left: 75px;">
					<input class="bgd_blue_two img_hand contenText" type="button" value="提交" onclick="exportBOMFile()">
					<input class="bgd_blue_two img_hand contenText" type="button" value="取消" onclick="cancel()">
				</div>
			</div>
		</div>
		<!--产品编号展示-->
		<div id="productNumberDisplayDiv" class="mask hidden">
							<div class="org_window" style="">
								<p>产品编号详情信息</p>
								<div class="article_list" style="width: 90%; margin: 0px auto;">
									<!------- 添加内容 ------->
									<div class="content content1">
										<!-- 用户列表内容区 -->
										<div class="con con_01">
											<!-- 表单信息填写区 -->
										<!--	<h4 class="sel_title" style="text-align: left;">
												<img src="../../img/list/brand1.png" /><span>产品编号详情信息</span>
											</h4>-->
											<div class="write_area">
													<sf:form method="post" id="addFrom" modelAttribute="organization">
													<table class="contentText" border="1" cellspacing="0" width="100%" cellpadding="0">
														  <tbody>
				                                    <tr class="menuText list_head">
                                      					<th>序号</th>
				                                        <th>产品编号</th>
				                                        <th>拼板编号</th>
				                                    </tr>
				                                </tbody>
														<tr>
															<td >1</td>
															<td >SCJH2019001702XD00100001</td>
															<td>SCJH2019001702XD00100001-00002</td>
														</tr>
														<tr>
															<td >2</td>
															<td ></td>
															<td ></td>
														</tr>
														<tr>
															<td >3</td>
															<td ></td>
															<td ></td>
														</tr>
														<tr>
															<td >4</td>
															<td ></td>
															<td ></td>
														</tr>
														<tr>
															<td >5</td>
															<td ></td>
															<td ></td>
														</tr>
													</table>
												</sf:form>
												<!-- 保存、重置按钮区 -->
												<div align="center" class="btn_submit" style="margin-top: 20px;">
													<a href="productionPlanManagement.html" class="bgd_blue_two img_hand">关闭</a>
													<!--<a href="organizationList.html" class="bgd_white_two img_hand">返回</a>-->
												</div>
											</div>
										</div>
									</div>
								</div>
							</div>
						</div>

		</div>
	</body>
	<script src="../../js/jquery-3.1.1.min.js" type="text/javascript" charset="utf-8"></script>
	<script src="../../js/common/common.js" type="text/javascript" charset="utf-8"></script>
	<script src="../../js/layui.js" type="text/javascript" charset="utf-8"></script>
	<script type="text/javascript">
		var h = document.documentElement.clientHeight;
		$(".wrap").css("height", h);
		
		// 获取每行 td 的兄弟节点
		$(".tbody_hover td").hover(   
			function () {      
				$(this).parent().children().addClass("td_hover");   
			},    
			function () {      
				$(this).parent().children().removeClass("td_hover");   
			}
		);
		// 点击下载EBOM模板
		$("#downloadEBOMTemplate").click(function() {
			alert("下载计划模板");
		});
		
		// 发布
		$("#publishPlan").click(function(){
			alert("已发布");
		});
		// 暂停
		$("#pausePlan").click(function(){
			alert("已暂停");
		});
		// 开始
		$("#resumePlan").click(function(){
			alert("已开始");
		});
		
		// 删除
		$("#del").click(function(){
			var checks = $("input[type='checkbox']:checked");
			if(checks.length > 0){
				var id = checks[0].id;
				// 删除
				alert("删除");
			}else{
				alert("请选择至少一个计划任务删除！");
			}
		});	
		//完成度弹框
		$("#completionSchedule").click(function(){
			window.location.href="productionPlanCompletionSchedule.html"
			$("#completions").removeClass("hidden");
		});
		//弹框点击取消
		function cancels(){
			$("#completions").addClass("hidden");
		}
		
		//导入计划
		$("#exportPlan").click(function(){
			$("#exportBOMDiv").removeClass("hidden");
		});
		//弹框点击取消
		function cancel(){
			$("#exportBOMDiv").addClass("hidden");
		}
		
		// 点击提交
		function exportBOMFile(){
			$("#exportBOMDiv").addClass("hidden");
		}
		// 点击下载模板
		$("#cancelPlan").click(function(){
			alert("已撤回");
		});
		// 可编辑下拉框取值
		function getContent(){
			$("#inputText").val($("#selectText option:selected").val());
		}
		function getContent1(){
			$("#inputText1").val($("#selectText1 option:selected").val());
		}
		function getContent2(){
			$("#inputText2").val($("#selectText2 option:selected").val());
		}
		
	    layui.use('element', function(){
			var $ = layui.jquery, 
			    element = layui.element; //Tab的切换功能，切换事件监听等，需要依赖element模块
			  
		    //触发事件：添加、删除、切换
		    var active = {
			    tabAdd: function(){
			        //新增一个Tab项
			        element.tabAdd('demo', {
			        	title: '新选项'+ (Math.random()*1000|0), 
			        	content: '内容'+ (Math.random()*1000|0),
			        	id: new Date().getTime() //实际使用一般是规定好的id，这里以时间戳模拟下
			        })
			    },
			    tabChange: function(){
			        //切换到指定Tab项
			        element.tabChange('demo', '22'); //切换到：“用户管理”
			    }
		    };
		  
		    $('.site-demo-active').on('click', function(){
		    	var othis = $(this), 
		        	type = othis.data('type');
		    	active[type] ? active[type].call(this, othis) : '';
		    });
		  
		    //Hash地址的定位
		    var layid = location.hash.replace(/^#test=/, '');
		    element.tabChange('test', layid);
		  
		    element.on('tab(test)', function(elem){
		   		location.hash = 'test='+ $(this).attr('lay-id');
		    });
		});
		/**
		 * 产品编号显示弹框
		 */
		$("#productNumberDisplay").click(function(){
			$("#productNumberDisplayDiv").removeClass("hidden");
		});
	</script>
</html>
